home *** CD-ROM | disk | FTP | other *** search
- From: magicsn@birdland.es.bawue.de (Steffen Haeuser)
- Path: eisbaer.bb.bawue.de!birdland.es.bawue.de
- Newsgroups: comp.sys.amiga.programmer
- Message-ID: <90000505713225420432@BIRDLAND>
- References: <4f7fqi$c0v@news.kth.se>
- X-Mailer: fastnet2rfc V2.0 - (tse) Lunqual%MAB@wsb.freinet.de / Tachy@wsb.freinet.de
- Organization: Birdland BBS, Dettingen/Teck, South Germany
- Content-Type: text/plain; charset=ISO-8859-1
- Subject: CyberGFX programming, help!
- Date: 08 Feb 1996 12:42:22
-
-
- d92-jfo%nada.kth.se@INTERNET wrote :
-
- >
- > I have recently begun programming CyberGFX, and have a few problems...
- >
- > 1) How do you actually create a 'CyberMap' yourself?
- > Do you simply AllocBitMap with depth > 8?
-
- You do not create a CyberMap. You open a Screen, and get the Map with the
- Screen. If you need more Maps (Maps that won't be displayed, for DBuffering
- and stuff...), then you open a double Height or Triple Height Screen...
-
- > 2) How do you perform a alpha-channeled blit?
-
- Oops... don't know... but blitting is done with BltBitmap and that stuff...
- will be patched to use the GFX Board Blitter... maybe it will automatically use
- Alpha Channel too, maybe not, i do not know...
-
- > 3) Is there no way to use unused gfx memory to store fi. bobs?
- > It would be great if you could pass a ABM_CARDMEMORY to AllocBitMap...
-
- The only way i found out to do so is : Allocating a double/triple/... height
- Screen. Triple height works, quadruple height, i think too, but somewhere
- beyond (for 640x480) maybe CyberGraphX does not want SUCH oversized screens
- anymore... did'nt try it for more than Quadruple height...
-
- > 4) Isn't ScaleRegion whatever supposed to... well, scale?
- > When I use it, the data just gets copied straight through?
-
- Hmmm, no idea...
-
- Steffen Haeuser
-
- BTW : Do not access the Bitmap through the Bitmap structure...
-
- instead...
-
- Use DoCMethodTagList and a Hook to get the address of the Video RAM base
- address...
-
- Example Hook : (out of my Source of rtgmaster.library...)
-
- movem.l d0-d6,-(sp)
- move.l (a1),d7 ; Address
- move.l 4(a1),d1 ; X-Offset
- move.l 8(a1),d2 ; Y-Offset
- clr.l d3
- clr.l d4
- move.w 20(a1),d3 ; BytesPerRow
- move.w 22(a1),d4 ; BytesPerPixel
- clr.l d6
- mulu d4,d1
- add.l d1,d6
- mulu d2,d3
- add.l d3,d6
- ror.l #2,d6
- add.l d6,d7
- movem.l (sp)+,d0-d6
- rts
-
- Will return the base address in d7... that is not quite OK, as
- DoCMethodTagList might CHANGE d7, but with all cybergraphics.library's that
- existed, it did not do so :) And there is not existing an alternative... the
- LockBitmap call in later cybergraphics.library does not work the way
-
- LockBitmap
- SaveBitmap
- Unlock it again
- Do your stuff
-
- and it is not alowed to do
- LockBitmap
- Do a LOT of stuff
- Unlock
- (no Library calls are allowed inside the lock)
-
- So we HAVE to do it with this Hook :)
-
- Steffen Haeuser
-